<script setup lang="ts">
import HelloWorld from "@/components/HelloWorld.vue";
import AndWen from "@/components/AndWen.vue";
import ComputedDemo from "@/components/ComputedDemo.vue";
import ComputedInternals from "@/components/ComputedInternals.vue";

import { useCounterStore } from "@/store/counter";
const counterStore = useCounterStore();
</script>

<template>
  <div>
    <a href="https://vite.dev" target="_blank">
      <img src="/vite.svg" class="logo" alt="Vite logo" />
    </a>
    <a href="https://vuejs.org/" target="_blank">
      <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
    </a>
  </div>

  <el-button v-hasPerm="['sys:user:add']">新增</el-button>
  <el-button v-hasPerm="['sys:user:delete']">删除</el-button>

  <h1 class="text-red">edfwefr</h1>
  <el-button type="primary" @click="counterStore.increment">count++</el-button>
  <!-- 计算属性演示 -->
  <ComputedDemo />
  <ComputedInternals />

  <!-- 原有组件 -->
  <HelloWorld msg="Vite + Vue" />
  <AndWen></AndWen>
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
